﻿using KAKA.Infrastructure;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace KAKA.Models
{
    public class ManagementModel
    {

    }
    public class MailBoxModel
    {

    }
    public class FriendModel
    {

    }
    public class BasicModel
    {
        [Display(Name = "性别")]
        public string Gender { get; set; }

        [Display(Name = "昵称")]
        public string Nickname { get; set; }

        [DataType(DataType.Date)]
        [Display(Name = "出生日期"), RegularExpression(@"(([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)", ErrorMessage = "请输入正确的日期及格式。如：1984-04-29")]
        public string FinalBirthday { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "年")]
        public string BirthYear { get; set; }
        [Required(ErrorMessage = "必填")]
        [Display(Name = "月")]
        public string BirthMonth { get; set; }
        [Required(ErrorMessage = "必填")]
        [Display(Name = "日")]
        public string BirthDay { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "身高")]
        public string Height { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "婚姻状态")]
        public string Marry { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "子女情况")]
        public string Child { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "教育情况")]
        public string Education { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "省")]
        [Range(1, int.MaxValue, ErrorMessage = "请先选择省")]
        public string Province { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "市")]
        [Range(1, int.MaxValue, ErrorMessage = "必填")]
        public string City { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "职业类型")]
        public string Occupation { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "基本收入")]
        public string Income { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "交友方式")]
        public string FriendType { get; set; }
    }

    public class DetailModel
    {
        [Required(ErrorMessage = "必填")]
        [Display(Name = "省")]
        public string RegisteredProvince { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "市")]
        public string RegisteredCity { get; set; }

        [Display(Name = "体重(kg)")]
        [RegularExpression(@"^(\d+\.\d{1,1}|\d+)$", ErrorMessage = "请输入合法体重数字。")]
        public string Weight { get; set; }

        [Display(Name = "属相")]
        public string Zodiac { get; set; }

        [Display(Name = "血型")]
        public string Blood { get; set; }

        [Display(Name = "星座")]
        public string Asterism { get; set; }

        [Display(Name = "民族")]
        public string Nation { get; set; }

        [Display(Name = "宗教")]
        public string Religion { get; set; }

        [Display(Name = "国籍")]
        public string Nationality { get; set; }
    }

    public class FamilyModel
    {
        [Display(Name = "是否单亲家庭")]
        public string Monotropic { get; set; }

        [Display(Name = "婚后是否要子女")]
        public string Dink { get; set; }

        [Display(Name = "是否独生子女")]
        public string Singleton { get; set; }

        [Display(Name = "居住情况")]
        public string Living { get; set; }

        [Display(Name = "购车情况")]
        public string Car { get; set; }

        [Display(Name = "购房情况")]
        public string House { get; set; }
    }

    public class HabitModel
    {
        [Display(Name = "健康状况")]
        public string Health { get; set; }

        [Display(Name = "是否吸烟")]
        public string Smoke { get; set; }

        [Display(Name = "是否喝酒")]
        public string Drink { get; set; }

        [Display(Name = "作息习惯")]
        public string Life { get; set; }

        [Display(Name = "锻炼习惯")]
        public string Exercise { get; set; }
    }

    public class WorkModel
    {
        [Display(Name = "公司行业")]
        public string Trade { get; set; }

        [Display(Name = "公司类型")]
        public string TradeType { get; set; }

        [Display(Name = "工作状态")]
        public string WorkState { get; set; }

        [Display(Name = "收入描述")]
        public string IncomeDetail { get; set; }

        [Display(Name = "公司名称")]
        [StringLength(20, ErrorMessage = "公司名称请限制在20个字符之内。")]
        [RegularExpression(@"^[\u4E00-\u9FA5A-Za-z0-9_]+$", ErrorMessage = "请输入合法公司名称。")]
        public string Company { get; set; }

        [Display(Name = "部门")]
        [StringLength(10, ErrorMessage = "部门名称请限制在10个字符之内。")]
        [RegularExpression(@"^[\u4E00-\u9FA5A-Za-z0-9_]+$", ErrorMessage = "请输入合法部门名称。")]
        public string Department { get; set; }

        [Display(Name = "职务")]
        [StringLength(10, ErrorMessage = "职务名称请限制在10个字符之内。")]
        [RegularExpression(@"^[\u4E00-\u9FA5A-Za-z0-9_]+$", ErrorMessage = "请输入合法职务名称。")]
        public string Duty { get; set; }

        [Display(Name = "其他投资")]
        [StringLength(20, ErrorMessage = "其他投资描述请限制在20个字符之内。")]
        [RegularExpression(@"^[\u4E00-\u9FA5A-Za-z0-9_]+$", ErrorMessage = "请输入合法其他投资描述。")]
        public string Investment { get; set; }

        [Display(Name = "毕业院校")]
        [StringLength(20, ErrorMessage = "院校名称请限制在20个字符之内。")]
        [RegularExpression(@"^[\u4E00-\u9FA5A-Za-z0-9_]+$", ErrorMessage = "请输入合法院校名称。")]
        public string School { get; set; }

        [Display(Name = "专业")]
        public string Major { get; set; }
    }

    public class IdentityModel
    {
        [Required(ErrorMessage = "必填")]
        [Display(Name = "真实姓名")]
        [RegularExpression(@"[\u4E00-\u9FA5]{2,5}(?:·[\u4E00-\u9FA5]{2,5})*", ErrorMessage = "请输入真实姓名。")]
        public string Realname { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "证件类型")]
        public string IdCardType { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "证件号码")]
        [Remote("IdCardValidate", "Personal", AdditionalFields = "IdCardType", ErrorMessage = "证件号码已存在或格式不正确")]
        public string IdCard { get; set; }
    }

    public class MobileModel
    {
        [Required(ErrorMessage = "必填")]
        [Display(Name = "移动电话")]
        [RegularExpression(@"^(\+86)?1[3,4,5,8]{1}[0-9]{9}$", ErrorMessage = "请输入正确的电话号码。")]
        public string Mobile { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "验证码")]
        public string VerificationCode { get; set; }

        public bool MobileVerified { get; set; }
    }

    public class EmailModel
    {
        public string Email { get; set; }

        [Required(ErrorMessage = "必填")]
        [DataType(DataType.EmailAddress)]
        [StringLength(100)]
        [RegularExpression(@"^\w+@\w+\.\w+$", ErrorMessage = "验证邮箱格式不正确")]
        [Display(Name = "更换验证邮箱前，请先输入当前验证邮箱，进行验证。")]
        public string OrigialEmail { get; set; }

        [Required(ErrorMessage = "必填")]
        [DataType(DataType.EmailAddress)]
        [StringLength(100)]
        [RegularExpression(@"^\w+@\w+\.\w+$", ErrorMessage = "验证邮箱格式不正确")]
        [Display(Name = "请输入新验证邮箱，并激活。")]
        public string NewEmail { get; set; }

        public bool EmailVerified { get; set; }
    }

    public class AlbumModel
    {
        public string Id { get; set; }
        public List<PhotographModel> Photos { get; set; }
    }

    public class PhotographModel
    {
        [Display(Name = "标题")]
        public string Caption { get; set; }
        public string Url { get; set; }
    }

    public class PortraitModel
    {
        public string Id { get; set; }
        [Required, Display(Name = "上传头像")]
        public string Portrait { get; set; }
        public string ImageTemp { get; set; }
        public string ImageX1 { get; set; }
        public string ImageY1 { get; set; }
        public string ImageX2 { get; set; }
        public string ImageY2 { get; set; }
        public string ImageWidth { get; set; }
        public string ImageHeight { get; set; }
    }

    public class DeclarationModel
    {
        [Required(ErrorMessage = "必填")]
        [Display(Name = "真爱宣言")]
        [StringLength(1000, ErrorMessage = "真爱宣言请限制在1000个字符之内。")]
        public string Declaration { get; set; }
    }

}